<script>
function show_(id){
    for(i=1; i<4;i++){
        if(i==id){
            jQuery('#content_'+i).fadeIn('slow');
            jQuery("#box_tip_"+i).addClass('active');
        }
        else{
            document.getElementById('content_'+i).style.display = "none";
            jQuery("#box_tip_"+i).removeClass('active');
        }
    }
}
</script> 
<?php //var_dump($tab); ?>
<div class="temp2">
    <p><?php echo $this->lang->line('fm_publication'); ?></p>
</div>
<?php
if(count($tab)>0)
{
?>
<div class="box_tip">
    <div class="box_tip_1" id="box_tip_1" style="cursor: pointer;" onclick="show_(1);">
        <div class="box_tip_text_1">
            <div class="f16px"><?php echo $tab[0]['title'] ?></div>
            <div><?php echo $tab[0]['intro'] ?></div>
        </div>
    </div>
    <div class="box_tip_2" id="box_tip_2" style="cursor: pointer;" onclick="show_(2);">
        <div class="box_tip_text_2">
            <div class="f16px"><?php echo $tab[1]['title'] ?></div>
            <div><?php echo $tab[1]['intro'] ?></div>
        </div>
    </div>
    <div class="box_tip_3" id="box_tip_3" style="cursor: pointer;" onclick="show_(3);">
        <div class="box_tip_text_3">
            <div class="f16px"><?php echo $tab[2]['title'] ?></div>
            <div><?php echo $tab[2]['intro'] ?></div>
        </div>
    </div>
    <div class="clear_left"></div>
</div>


<div class="content" id="content_1" style="display: block;">
    <!--<div class="title_home">
        Title Goes Here 1
    </div>-->
    <div class="text_home">
        <div class="text_home1">
            <div class="p10r">
            <div>
            <?php echo $tab[0]['content'] ?>
            </div>
            </div>
        </div>
       <?php 
		 if($tab[0]['picture']!='') 
		 {
		 ?>
        <div class="text_home2"><img src="<?php echo base_url(); ?>upload_file/article/<?php echo $tab[0]['picture']; ?>" width="220px" /></div>
        <?php 
		 }
		 ?>
        <div class="clear_left"></div>
    </div>
</div>
<div class="content" id="content_2" style="display: none;">
    <div class="text_home">
        <div class="text_home1">
            <div class="p10r">
            <div>
			 <?php echo $tab[1]['content'] ?>
            </div>
            </div>
        </div>
       <?php 
		 if($tab[1]['picture']!='') 
		 {
		 ?>
        <div class="text_home2"><img src="<?php echo base_url(); ?>upload_file/article/<?php echo $tab[1]['picture']; ?>" width="220px" /></div>
        <?php 
		 }
		 ?>
        <div class="clear_left"></div>
    </div>
</div>
<div class="content" id="content_3" style="display: none;">
    <div class="text_home">
        <div class="text_home1">
            <div class="p10r">
            <div>
			 <?php echo $tab[2]['content'] ?>
            </div>
            </div>
        </div>
        <?php 
		 if($tab[2]['picture']!='') 
		 {
		 ?>
        <div class="text_home2"><img src="<?php echo base_url(); ?>upload_file/article/<?php echo $tab[2]['picture']; ?>" width="220px" /></div>
        <?php 
		 }
		 ?>       
        <div class="clear_left"></div>
    </div>    
</div>
<?php
}
?>
<script>
jQuery(document).ready(function(){
	jQuery("#publication_active").addClass('current');
	show_(1);
});
</script>